home *** CD-ROM | disk | FTP | other *** search
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Warp Tunnel
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` By Rich Davey (rich@fatal-design.com)
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Fly and spin down a warp tunnel! Easy
- ` effect but looks really effective
- ` with a good texture.
- `
- ` Music listened to while coding this
- ` The Beach soundtrack.
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- sync rate 60
- sync on
- hide mouse
-
- ` 128x128 texture
- ` Change to "lava.bmp" for a different effect
-
- load image "plasma.bmp",1
-
- ` Music
-
- load music "rom.mid",1
-
- ` Create 2 copies of this texture as bitmap 1 then grab it to image 2
-
- create bitmap 1,128,256
- set current bitmap 1
- paste image 1,0,0
- paste image 1,0,128
-
- ` Set drawing back to the screen
-
- set current bitmap 0
- create bitmap 2,128,128
-
- ` Lets make our tunnel
-
- make object cylinder 1,100
- rotate object 1,270,0,270
- fix object pivot 1
- scale object 1,100,100,2500
- texture object 1,1
- set object 1,1,0,0
-
- ` Hide the end of the cylinder
-
- make object sphere 2,100
- color object 2,rgb(0,0,0)
- position object 2,0,0,1000
-
- color backdrop rgb(0,0,0)
-
- position camera 0,0,-1250
-
- ` Change to alter speed of zoom
-
- speed=1; limit=1; counter=0
- play music 1
-
- ` Main Loop
-
- do
-
- if counter=limit
- set current bitmap 1
- get image 2,0,y,128,y+128
- set current bitmap 2
- paste image 2,0,0
- set current bitmap 0
- texture object 1,2
- inc y
- if y=128 then y=0
- counter=0
- endif
-
- z=z+speed; zrotate camera wrapvalue(z)
- inc counter
-
- sync
-
- loop
-
-